@extends('admin.common')

@section('warp_head')
    <h1>
        文章视频
        <small>播放页面</small>
    </h1>

    <ol class="breadcrumb" style="margin-right: 30px;">
        <li><a href="{{ admin_url('/') }}"><i class="fa fa-dashboard"></i> Home</a></li>

    </ol>
@endsection

@section('warp_content')
    <div class="box">
        <div class="box-header" style="padding-top: 0;">
            <h3 class="box-title"></h3>
            <div class="row" style="padding-bottom: 15px;">
                <div class="col-sm-2">
                    <div class="form-group">
                        <label for=""></label>
                        <div class="input-group input-group-height ">
                            <a href="/admin/article" class="btn btn-facebook"><i class="fa fa-undo"></i>&nbsp;&nbsp;返回列表</a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="pull-right">

            </div>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive no-padding">
            <div class="col-lg-10">
                <video controls="" autoplay="" name="media">
                    <source src="{{ $source }}" type="video/mp4">
                </video>
            </div>
        </div>

        <div class="col-sm-12" style="margin-top: 15px;">
            <a href="{{ $source }}" target="_blank">如果不能播放???刷下下点击这里</a>
        </div>
        <div class="col-sm-12" style="margin-top: 15px;">
            复制链接打开!<input class="col-sm-10" type="text" id="source" value="{{ $source }}">
        </div>
        <div class="box-footer clearfix">

        </div>
        <!-- /.box-body -->
    </div>
@endsection

@section('script')
    <script>
        window.onload = function(){
            var source = $('#source').val();
            if(source == '/') {
                window.location.reload();
            }
        };
    </script>
@endsection